package ds;


public interface Constants {

	public String lineSeperator = System.getProperty("line.separator");
	public String fileSeparator = System.getProperty("file.separator");
	
	/**
	 * xml data process
	 */
	public String outputDir = "output" + fileSeparator;
	public String inputDir = "data" + fileSeparator + "input" + fileSeparator;
	public String stopwords = Constants.inputDir + "stopwords.txt";
	public String manualBaseDict = Constants.inputDir + "manualBaseDict.txt";
	public String manualSplitDict = Constants.inputDir + "manualSplitDict.txt";
	public String keywords = Constants.inputDir + "keywords.txt";
	public String pkgNamesFile = Constants.inputDir + "pkgNames.txt";
	
	public String regexEnterSpaceDelimiters = "\\uA1B0|\\uA1B1|\\u000A|\\u000D";
	public String regexNonSingleQuotDelimiters = "[,.;:=-]|[\"]|\\u005B|\\u005D|\\u0023|\\u0024|\\u0025|\\u0026|\\u0028|\\u0029|\\u002B|\\u002A|\\u003F";
	public String regexNonAlphDelimiters = "\\p{Punct}|\\d+";
//	public String regexNonAlphDelimiters = regexNonSingleQuotDelimiters + "|\\u0027|\\u005C|\\u005E|\\u007C|\\u007B|\\u007D";
	public String oldformatXML = Constants.inputDir + "allbugs_oldformat.xml";
	
	public String newformatXML = Constants.inputDir + "allbugs.xml";
//	public String eclipseBugReports = Constants.inputDir + "allbugs.xml";
	public String eclipseBugReports = Constants.inputDir + "full_Eclipse.xml";
	public String cleanedEclipseBugReports = Constants.inputDir + "Eclipse_dev.xml";    //only one developer
	public String statisticEclipseBugReports = Constants.inputDir + "static_Eclipse.txt";
	
	public String netbeansBugReports = Constants.inputDir + "full_NetBeans.xml";
	public String cleanedNetbeansBugReports = Constants.inputDir + "NetBeans_dev.xml";  //only one developer
	public String statisticNetbeansBugReports = Constants.inputDir + "static_NetBeans.txt";
	
	public String apacheBugReports = Constants.inputDir + "full_Apache.xml";
	public String cleanedApacheBugReports = Constants.inputDir + "Apache_dev.xml";  //only one developer
	public String statisticApacheBugReports = Constants.inputDir + "static_Apache.txt";
	
	public String eclipseOpArffFile = Constants.inputDir + "EclipseReports(file).arff";
	public String eclipsePureArffFile = Constants.inputDir + "EclipseReports(pure).arff";
	public String projectABugReports = Constants.inputDir + "ProjectABugReports-all.xml";
	public String updatedProjectABugReports = Constants.inputDir + "ProjectABugReports-Update.xml";
	public String cleanedProjectABugReports = Constants.inputDir + "CProjectABugReports.xml";
	public String cleanedUpdatedProjectABugReports = Constants.inputDir + "CUProjectABugReports.xml";
	public String projectAOpArffFile = Constants.inputDir + "ProjectAReports(file).arff";
	public String projectAPureArffFile = Constants.inputDir + "ProjectAReports(pure).arff";
	public String projectBBugReports = Constants.inputDir + "ProjectBBugReports.xml";
	public String updatedProjectBBugReports = Constants.inputDir + "ProjectBBugReports-Update.xml";
	public String cleanedProjectBBugReports = Constants.inputDir + "CProjectBBugReports.xml";
	public String cleanedUpdatedProjectBBugReports = Constants.inputDir + "CUProjectBBugReports.xml";
	public String projectBOpArffFile = Constants.inputDir + "ProjectBReports(file).arff";
	public String projectBPureArffFile = Constants.inputDir + "ProjectBReports(pure).arff";
	public String projectDBugReports = Constants.inputDir + "ProjectDBugReports.xml";
	public String cleanedProjectDBugReports = Constants.inputDir + "CProjectDBugReports.xml";
	public String projectDOpArffFile = Constants.inputDir + "ProjectDReports(file).arff";
	public String projectDPureArffFile = Constants.inputDir + "ProjectDReports(pure).arff";
	
	public String trainingDataFile = Constants.inputDir  + "training.xml";
	public String testingDataFile = Constants.inputDir + "testing.xml";
	public int maxBugCount = 5000; 
	public int maxCharCountPerLine = 10000000;
	public int minWordLength = 2;   //TODO: control the keyword length
	public int frequencyPruneThresholdMin = 3; //2, 5, 6
	public int frequencyPruneThresholdMax = 20000;
	public int minValidBugDescriptionLen = 30;
	public double similarityThreshold = 0.01;   //to filter the low similarity bugs
	
	public int minValidPackageLen = 3;        //min valid sub packages in a full name
	//java : 4, c#: 5
	public int defaultValidComponentDeepth = 5;   //how to extract component. for eclipse data, use 4; for netbeans data, use 4
	public String[] SUPPORTED_SRC_SUFFIX = new String[] {
			".java", ".form", ".h", ".c", ".xml", ".xaml.cs", ".xaml", ".cs"
	};
	//eclipse, netbeans, apache
	public int[] VALID_COMPONENT_DEEPTH_BY_PROJECT = new int[] {
		5, 4, 5
	};
	
	public String WEKA_arffFile = Constants.inputDir + "BugReports.arff";
	/**
	 * Translator
	 */
	public String trainingDescFile = Constants.inputDir + "training.txt";
	public String testingDescFile = Constants.inputDir + "testing.txt";
	public String word_debugFile = outputDir + "word_debug.txt";
	
//	public String allDescFile = Constants.keyword_dictionary;
	
	/**
	 * Analysis
	 */
	public String analysisDir = Constants.outputDir + "Analysis" + fileSeparator;
	public String ALY_dotFile = Constants.analysisDir + "eclipseBugs.dot";
	public String ALY_graphviz_nodeNameMap = Constants.outputDir + "fileNodemap.txt";
	public String ALY_excelFile = Constants.analysisDir + "eclipseBugs2Excel.txt";
	public String ALY_pkgAnalysisResult = Constants.analysisDir + "pkgAnalysisResult.txt";
	
	/**
	 * LDA
	 */
	public String ldaDir = Constants.inputDir + "LDA" + fileSeparator;
	public String LDA_wordsmapFile = Constants.ldaDir + "wordmap.txt";
	public String LDA_topicwordsFile = Constants.ldaDir + "model-final.twords";
	public String LDA_modelAssignFile = Constants.ldaDir + "model-final.tassign";
	public String LDA_testAssignFile = Constants.ldaDir + "testing.txt.model-final.tassign";
	/**
	 * parameters to control the graph size and structure
	 */
	public int LDA_topicCount = 20;   // TODO modify the count according to dataset;
	public int LDA_wordPerTopic = 10; // TODO modify the count according to dataset;

	/**
	 * Random Walk with Restart
	 */
	public int RWR_ALG_IterCount = 50;
	public double RWR_ALG_RestartProbability = 0.1;
	public double RWR_ALG_Delta = 0.000001;
	
	public double RWR_dfWeight = 1.0; // TODO well plan the weight between developer and file
	public double RWR_fbWeight = 1.0; // TODO well plan the weight between file and bug
	public double RWR_bbWeight = 1.0; // TODO well plan the weight between training bugs and testing bugs
	public double RWR_hierarchy_alpha = 0.1; //
	public double RWR_pcWeight = 1; // TODO from parent pkg to child pkg
	public double RWR_cpWeight = 1;  // TODO from child pkg to parent pkg
	public double RWR_pdWeight = 1; // TODO base package --> developer
	public double RWR_pbWeight = 1; // TODO base package --> testingBug
	/**
	 * deal with results 
	 */
	public String DEBUG_DebugFile = outputDir + "debug.txt";
	public String ROUND_DataDir = Constants.inputDir + "DataOnRound" + fileSeparator;	
	
	/**
	 * Domain Of Knowledge
	 */
	public String DOK_FileChangeLog = Constants.inputDir + "DOK" + fileSeparator + "file_change_log.txt";
	public String DokDir = Constants.outputDir + "DOK" + fileSeparator;
	public String DOK_ChangeLog_Dir = Constants.DokDir + "changeLogs/";
	public String DOK_NewFormat_File = Constants.DokDir + "fileDesciptions.txt";
	public String DOK_FileName2Id_Map = Constants.DokDir + "fileName2IdMap.txt";
	public String DOK_File2developerDOK = Constants.DokDir + "DOK_file2developerDOK.txt";
	
	/**
	 * VSM
	 */
	public String VSM_trainDataDecsFile = trainingDescFile;
	public String VSM_testDataDescFile = testingDescFile;
	public String VSM_trainDataFile = trainingDataFile;
	public String VSM_testDataFile = testingDataFile;
	
	public String vsmDir =  Constants.outputDir + "VSM" + fileSeparator;
	public String VSM_wvtool_trainingFileDir = Constants.vsmDir + "train" + fileSeparator;
	public String VSM_wvtool_testingFileDir = Constants.vsmDir + "test" + fileSeparator;

	public String VSM_correctnessFile = Constants.vsmDir + "statisticsCorrectnessVSM.txt";
	public String VSM_testingBug2Developer = Constants.vsmDir + "testing2DeveloperVSM.txt";
	public String VSM_similarityMatrixBin = Constants.vsmDir + "similarityMatrix.bin";
	public String VSM_tfIdfFile = Constants.vsmDir + "wvToolTfIdf.txt";
	public String VSM_wordlistFile = Constants.vsmDir + "wvToolWordlist.txt";
	public String  VSM_wordVectorFile = Constants.vsmDir + "wvToolWordVector.txt";
	public String VSM_rowACol2BugIdMapFile = Constants.vsmDir + "vsm_rowAcol2bugIdmap.txt";
	public String VSM_similarityMatrixFile = Constants.vsmDir + "bugSimilarity.txt";
	
	/**
	 * SBG
	 */
	public String sbgDir = Constants.outputDir + "SBG" + fileSeparator;
	public String RWR_SBG_GraphFile = Constants.sbgDir + "graphSBG.txt";
	public String RWR_SBG_RawResultFile = Constants.sbgDir + "RWRRawResultSBG.txt";
	public String RWR_SBG_GraphNodesInfoFile = Constants.sbgDir + "graphNodeInfoSBG.txt";
	public String RWR_SBG_GraphNodeId2NameMapFile = Constants.sbgDir + "nodeId2nameSBG.txt";
	public String RWR_SBG_testBug2DevMatrixFile = Constants.sbgDir + "testing2DeveloperSBG.txt";
	public String RWR_SBG_correctnessFile = Constants.sbgDir + "statisticsCorrectnessSBG.txt";
	public double RWR_SBG_NetworkSizeThreshold = 0.1;
	
	public String PR_SBG_Original_GraphFile = Constants.sbgDir + "wholeGraphSBG.txt";
	public String PR_SBG_GraphFile = Constants.sbgDir + "graphSBG.txt";
	public String PR_SBG_RawResultFile = Constants.sbgDir + "RWRRawResultSBG.txt";
	public String PR_SBG_GraphNodesInfoFile = Constants.sbgDir + "graphNodeInfoSBG.txt";
	public String PR_SBG_GraphNodeId2NameMapFile = Constants.sbgDir + "nodeId2nameSBG.txt";
	public String PR_SBG_testBug2DevMatrixFile = Constants.sbgDir + "testing2DeveloperSBG.txt";
	public String PR_SBG_correctnessFile = Constants.sbgDir + "statisticsCorrectnessSBG.txt";
	public double PR_SBG_NetworkSizeThreshold = 0.1;
	
	/**
	 * DCB
	 */
	public String dcbDir = Constants.outputDir + "DCB" + fileSeparator;
	public String PR_DCB_Original_GraphFile = Constants.dcbDir + "wholeGraphDCB.txt";
	public String PR_DCB_GraphFile = Constants.dcbDir + "graphDCB.txt";
	public String PR_DCB_RawResultFile = Constants.dcbDir + "RWRRawResultDCB.txt";
	public String PR_DCB_GraphNodesInfoFile = Constants.dcbDir + "graphNodeInfoDCB.txt";
	public String PR_DCB_GraphNodeId2NameMapFile = Constants.dcbDir + "nodeId2nameDCB.txt";
	public String PR_DCB_testBug2DevMatrixFile = Constants.dcbDir + "testing2DeveloperDCB.txt";
	public String PR_DCB_correctnessFile = Constants.dcbDir + "statisticsCorrectnessDCB.txt";
	public double PR_DCB_NetworkSizeThreshold = 0.1;
	
	
	/**
	 * Developer Graph
	 */
	public String dgDir = Constants.outputDir + "DG" + fileSeparator;
	public String RWR_DG_Original_GraphFile = Constants.dgDir + "wholeGraphDG.txt";
	public String RWR_DG_Normalized_GraphFile = Constants.dgDir + "normalizedGraphDG.txt";
	public String RWR_DG_RawResultFile = Constants.dgDir + "RWRRawResultDG.txt";
	public String RWR_DG_GraphNodesInfoFile = Constants.dgDir + "graphNodeInfoDG.txt";
	public String RWR_DG_GraphNodeId2NameMapFile = Constants.dgDir + "nodeId2nameDG.txt";
	public String RWR_DG_testBug2DevMatrixFile = Constants.dgDir + "testing2DeveloperDG.txt";
	public String RWR_DG_correctnessFile = Constants.dgDir + "statisticsCorrectnessDG.txt";
	public double RWR_DG_NetworkSizeThreshold = 0.1;
	
	/**
	 * DFB
	 */
	public String dfbDir = Constants.outputDir + "DFB" + fileSeparator;
	public String RWR_DFB_GraphFile = Constants.dfbDir + "graphDFB.txt";
	public String RWR_DFB_RawResultFile = Constants.dfbDir + "RWRRawResultDFB.txt";
	public String RWR_DFB_GraphNodesInfoFile = Constants.dfbDir + "graphNodeInfoDFB.txt";
	public String RWR_DFB_GraphNodeId2NameMapFile =Constants.dfbDir + "nodeId2nameDFB.txt";
	public String RWR_DFB_testBug2DevMatrixFile = Constants.dfbDir + "testing2DeveloperDFB.txt";
	public String RWR_DFB_correctnessFile = Constants.dfbDir + "statisticsCorrectnessDFB.txt";
	
	/**
	 * rDFB
	 */
	public String rdfbDir = Constants.outputDir + "rDFB" + fileSeparator;
	public String RWR_RDFB_GraphFile = Constants.rdfbDir + "graphRDFB.txt";
	public String RWR_RDFB_RawResultFile = Constants.rdfbDir + "RWRRawResultRDFB.txt";
	public String RWR_RDFB_GraphNodesInfoFile = Constants.rdfbDir + "graphNodeInfoRDFB.txt";
	public String RWR_RDFB_GraphNodeId2NameMapFile =Constants.rdfbDir + "nodeId2nameRDFB.txt";
	public String RWR_RDFB_testBug2DevMatrixFile = Constants.rdfbDir + "testing2DeveloperRDFB.txt";
	public String RWR_RDFB_correctnessFile = Constants.rdfbDir + "statisticsCorrectnessRDFB.txt";
	
	/**
	 * DFBT
	 */
	public String dfbtDir = Constants.outputDir + "DFBT" + fileSeparator;
	public String RWR_DFBT_GraphFile = Constants.dfbtDir + "graphDFBT.txt";
	public String RWR_DFBT_testBug2DevMatrixFile = Constants.dfbtDir + "testing2DeveloperDFBT.txt";
	public String RWR_DFBT_RawResultFile = Constants.dfbtDir + "RWRRawResultDFBT.txt";
	public String RWR_DFBT_GraphNodesInfoFile = Constants.dfbtDir + "graphNodeInfoDBFT.txt";
	public String RWR_DFBT_GraphNodeId2NameMapFile = Constants.dfbtDir + "nodeId2nameDFBT.txt";
	public String RWR_DFBT_correctnessFile = Constants.dfbtDir + "statisticsCorrectnessDFBT.txt";

	/**
	 * DPB (developer - package - bug network)
	 */
	public String DPB_trainDataDecsFile = trainingDescFile;
	public String DPB_testDataDescFile = testingDescFile;
	public String DPB_trainDataFile = trainingDataFile;
	public String DPB_testDataFile = testingDataFile;
	public String dpbDir =  Constants.outputDir + "DPB" + fileSeparator;
	public String DPB_GraphFile = Constants.dpbDir + "graphDPB.txt";
	public String DPB_RawResultFile = Constants.dpbDir + "RWRRawResultDPB.txt";
	public String DPB_GraphNodesInfoFile = Constants.dpbDir + "graphNodeInfoDPB.txt";
	public String DPB_GraphNodeId2NameMapFile =Constants.dpbDir + "nodeId2nameDPB.txt";
	public String DPB_testBug2DevMatrixFile = Constants.dpbDir + "testing2DeveloperDPB.txt";
	public String DPB_testingBug2Developer = Constants.dpbDir + "testing2DeveloperDPB.txt";
	public String DPB_correctnessFile = Constants.dpbDir + "statisticsCorrectnessDPB.txt";
	
	/**
	 * PDG  (hierarchical package & developer graph)
	 */
	public String pdgDir =  Constants.outputDir + "PDG" + fileSeparator;
	public String PDG_GraphFile = Constants.pdgDir + "graphPDG.txt";
	public String PDG_RawResultFile = Constants.pdgDir + "RWRRawResultPDG.txt";
	public String PDG_GraphNodesInfoFile = Constants.pdgDir + "graphNodeInfoPDG.txt";
	public String PDG_GraphNodeId2NameMapFile =Constants.pdgDir + "nodeId2namePDG.txt";
	public String PDG_testBug2DevMatrixFile = Constants.pdgDir + "testing2DeveloperPDG.txt";
	public String PDG_testingBug2Developer = Constants.pdgDir + "testing2DeveloperPDG.txt";
	public String PDG_correctnessFile = Constants.pdgDir + "statisticsCorrectnessPDG.txt";
	
	/**
	 * Combine
	 */
	public String comDir = Constants.outputDir + "Combined" + fileSeparator;
	public String RWR_com_testingBug2developer = Constants.comDir + "testing2DeveloperCombined.txt";
	public String RWR_STA_com_correctnessFile = Constants.comDir + "statisticsCorrectnessCombined.txt";
	
	
}